package com.autowire.annotation;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.autowire.annotation")
public class AppConfig {
    @Bean("managerLevelEmployee")
    public Employee managerLevelEmployee(){
        Employee emp = new Employee();
        emp.setEmpId(2);
        emp.setFirstName("Jane");
        emp.setLastName("Doe");
        emp.setSalary(60000.0);
        return emp;
    }

    @Bean("directorLevelEmployee")
    public Employee directorLevelEmployee(){
        Employee emp = new Employee();
        emp.setEmpId(3);
        emp.setFirstName("John");
        emp.setLastName("Ray");
        emp.setSalary(90000.0);
        return emp;
    }
}
